In typical data processing systems, as exemplified by the above references, the contents of the main storage are divided into small groups of bits for addressing purposes. These groups (or "elements of addressability") may be, for example, bytes, as in the IBM System/360 or words (of two bytes each) as in the IBM 1130 System. It is important to note that all storage addressing means can only reference information located at the boundary of an element of addressability and that data are fetched or stored from main storage as single or multiple elements of addressability.
Users and programmers of prior art data processing systems must thus operate under considerable difficulty when attempting to deal with main storage operands which are not aligned with the boundaries of elements of addressability or which are not the same size as one element, or some integral number of elements of addressability.
Historically, interrogation (that is, reading) of a general bit field implied loading the word(s) or byte(s) containing the information, and then two shifts (or the equivalent) to isolate and align the field of interest. Emulation and interpretation techniques make heavy usage of such techniques.
The inverse operation (storing a general bit field) historically required such extensive manipulation that data was often not packed (with inherent storage inefficiency) if it would subsequently require random updating.
The prior art described partial solutions to this problem in that it does describe means whereby the leading edge of an unaligned operand may be accessed. However, the prior art handles situations in which the operand does not overlap the boundary of the next element of addressability. This means that all directly accessable unaligned operands must lie totally within a single unit of addressability. It should be evident that, although this lessens the user burden (by reducing the frequency with which a programmer has to recompute addressability) it does not eliminate the problem. The prior art, in contrast to the present invention, does not permit the general accessing of unaigned bit fields of variable length without regard for boundaries of elements of addressability in the system.
This invention overcomes the above difficulty by enabling one to easily handle unaligned bit fields of varying lengths with a single machine instruction. It provides storage optimization for information represented as bit fields of arbitrary length (up to a predetermined maximum length) without concern for byte or word boundaries.